<?php

namespace app\wx\controller;

use app\common\library\Openssl;
use think\Db;
use think\facade\Request;
use think\Validate;
use think\helper\Time;

class Interest extends Base
{



    public function index()
    {

        $openssl = new Openssl();
        $data['expires_in'] = time() + 60 * 10;
        $data['domain']=Request::host();
        $token = $openssl->encrypt(json_encode($data));
        $url = 'https://openwx.weibuyun.com/auth/wxqrcode?token=' . $token;
        //dump(@file_get_contents($url));
        $this->assign('wxqrcode', @file_get_contents($url));
        return view('index');
    }


}
